package com.hy.appium1;

import org.openqa.selenium.remote.DesiredCapabilities;

import java.net.MalformedURLException;
import java.net.URL;

public class AppiumDemo1 {

    public static void main(String[] args) throws MalformedURLException {

        //1.需要创建配置对象   desiredcapabilities

        DesiredCapabilities desiredCapabilities = new DesiredCapabilities();

        //将需要启动的软件的一些配置添加进来

        //1.添加需要测试 的主机的路径
        desiredCapabilities.setCapability("deviceName", "127.0.0.1:62001");

        desiredCapabilities.setCapability("platformName", "Android");

        desiredCapabilities.setCapability("appPackage", "com.handsgo.jiakao.android");

        //默认启动不初始化软件
        desiredCapabilities.setCapability("noReset", "true");

        //自动化引擎
//        desiredCapabilities.setCapability("");

        desiredCapabilities.setCapability("appActivity","com.handsgo.jiakao.android.splash.Login");



        //创建驱动
        URL url = new URL("http://127.0.0.1:4723/wd/hub");

//        AndroidDriver<WebElement> Driver = new AndroidDriver<WebElement>(url, desiredCapabilities);

//        AppiumDriver appiumDriver = new AppiumDriver(url, desiredCapabilities);
    }
}
